package org.yxj.pickerviewlib;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import com.airsaid.pickerviewlibrary.OptionsPickerView;
import com.airsaid.pickerviewlibrary.PickerCityUtils;
import com.airsaid.pickerviewlibrary.TimePickerView;
import java.util.ArrayList;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        /**
         * 地址选择
         */
        new PickerCityUtils(this).show();


        /**
         * 条件选择
         */
        OptionsPickerView<String> optionsPickerView =  new OptionsPickerView(this);
        ArrayList<String> strings = new ArrayList<>();
        strings.add("车舒适");
        strings.add("车舒适");
        strings.add("车舒适");
        strings.add("车舒适");
        strings.add("车舒适");
        strings.add("车舒适");
        strings.add("车舒适");
        //一级
        optionsPickerView.setPicker(strings);
        optionsPickerView.show();

        /**
         * 时间选择
         */
        TimePickerView timePickerView = new TimePickerView(this, TimePickerView.Type.ALL);
        timePickerView.show();
    }
}